package model;

import java.util.List;
import java.lang.Object;

import modelInterfaces.IEvent;
import modelInterfaces.ISubject;

/**
 * Represents the content with which {@link Subject} interacted 
 * @see ISubject
 */
public class Subject implements ISubject {
	private int id;
	private String name = "n/d";
	private List<IEvent> eventList;
	
	@Override
	public int getId() {
		return this.id;
	}
	
	@Override
	public String getName() {
		return this.name;
	}
	
	@Override
	public void setEventList(List<IEvent> eventList) {
		this.eventList = eventList;
	}
	
	@Override
	public void setId(int id) {
		this.id = id;
	}
	
	@Override
	public void setName(String name) {
		this.name = name;
	}
	

	@Override
	public List<IEvent> getEventList() {
		return this.eventList;
	}


	
	public String toString()
	{
		return String.valueOf(getId());
	}	
	
	@Override
	public boolean equals(Object o) {
	    if (!(o instanceof ISubject)) {
	      return false;
	    }
	    ISubject other = (ISubject) o;
	    return (id==other.getId());
	}
}
